import { useTranslation } from "react-i18next"

/** 公用 API 表格表头 */
export const comColumns = [
    { key: "schema", title: "schema" },
    { key: "type", title: "type" },
    { key: "defaultValue", title: "defaultValue" },
    { key: "isRequire", title: "isRequire" },
    { key: "desc", title: "desc" }
]

export const useGetTableCols = () => {
    const { t } = useTranslation()
    return comColumns.map((it) => ({ ...it, title: t(it.title) }))
}
